<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>获取坐标</title>
    <script>
    window.onload=function(){
        document.onclick=function(ev){
            //IE
            // alert(event.clientX+','+event.clientY);
 
            //火狐
            // alert(ev.clientX+','+ev.clientY);
            
            //兼任IE9
            var oEvent=ev||event;
            alert(oEvent.clientX+','+oEvent.clientY);
        }
    }
    </script>
</head>
<body>
    
</body>
</html>